﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Back-end.Master" AutoEventWireup="true" CodeBehind="QuanLyBaiHoc.aspx.cs" Inherits="TracNghiemTinHocDaiCuong.QuanLyBaiHoc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="BaiHoc">
        <div>
            Tên bài học: &emsp;
            <asp:TextBox ID="txtTenBaiHoc" runat="Server" CssClass="txt"></asp:TextBox>&nbsp
            <asp:Button ID="btnTimKiem" runat="Server" Text="Tìm kiếm" OnClick="btnTimKiem_Click"/>
            <br />
            <br />
            <asp:Button ID="btnThemBaiHoc" runat="server" Text="Thêm" OnClick="btnThemBaiHoc_Click"/>&nbsp&nbsp
            <asp:Button ID="btnSuaBaiHoc" runat="server" Text="Sửa" OnClick="btnSuaBaiHoc_Click"/>&nbsp&nbsp
            <asp:Button ID="btnXoaBaiHoc" runat="server" Text="Xóa" OnClick="btnXoaBaiHoc_Click"
            OnClientClick="return confirm('Bạn có muốn xóa chủ đề này?');"/>&nbsp&nbsp
        </div>
        <div class="gvBaiHoc">
            <asp:Label ID="lblThongBao" runat="server" ForeColor="Red" Font-Bold="true"></asp:Label>
            <asp:GridView ID="gvBaiHoc" runat="server" AutoGenerateColumns="False" Width="75%"
                BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" 
                CellPadding="4" SelectedRowStyle-BackColor="Blue" AllowPaging="True"
                OnPageIndexChanging="gvBaiHoc_PageIndexChanging">
                <Columns>
                    <asp:BoundField HeaderText="Tên bài học" DataField="TenBH"/>
                    <asp:BoundField HeaderText="Nội dung" DataField="NoiDung" />
                    <asp:TemplateField HeaderText="Chọn">
                        <ItemTemplate>
                            <asp:LinkButton ID="lkbtnBaiHoc" runat="server" ForeColor="Blue" CommandName='<%# Eval("MaBH") %>'
                            OnCommand="lkbtnBaiHoc_Click"
                            CommandArgument='<%# ((GridViewRow)Container).RowIndex %>'>Chọn</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                <RowStyle BackColor="White" ForeColor="#003399" />
                <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                <SortedAscendingCellStyle BackColor="#EDF6F6" />
                <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
                <SortedDescendingCellStyle BackColor="#D6DFDF" />
                <SortedDescendingHeaderStyle BackColor="#002876" />
            </asp:GridView>
        </div>
    </div>
</asp:Content>
